package com.yj.web.WeChat.Bean;

import lombok.Data;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by yanlinyang on 2017/9/11.
 */
@Data
public class WxMaterial {
    private String name;
    private File file;
    private String videoTitle;
    private String videoIntroduction;

    public WxMaterial() {
    }

    public WxMaterial(String name, File file, String videoTitle, String videoIntroduction) {
        this.name = name;
        this.file = file;
        this.videoTitle = videoTitle;
        this.videoIntroduction = videoIntroduction;
    }

    public Map<String, String> getForm() {
        Map<String, String> form = new HashMap<String, String>();
        form.put("title", videoTitle);
        form.put("introduction", videoIntroduction);
        return form;
    }

    @Override
    public String toString() {
        return "WxMpMaterial [" + "name=" + name + ", file=" + file + ", videoTitle=" + videoTitle + ", videoIntroduction=" + videoIntroduction + "]";
    }
}
